package routers

import (
	beego "github.com/beego/beego/v2/server/web"
	"medical/controllers"
)

func init() {
	beego.Router("/", &controllers.MainController{})

	beego.Router("/upload", &controllers.DrugController{}, "post:Upload")
	beego.Router("/drug/add", &controllers.DrugController{}, "post:Add")
	beego.Router("/drug/list", &controllers.DrugController{}, "get:List")
	beego.Router("/drug/delete", &controllers.DrugController{}, "get:Delete")
	beego.Router("/drug/info", &controllers.DrugController{}, "get:Info")
	beego.Router("/drug/update", &controllers.DrugController{}, "post:Update")
	beego.Router("/drug/update_status", &controllers.DrugController{}, "post:UpdateDrugStatus")
	beego.Router("/drug/rank", &controllers.DrugController{}, "get:Rank")
	beego.Router("/user/register", &controllers.UserController{}, "post:Register")
	beego.Router("/user/login", &controllers.UserController{}, "post:Login")
}
